package com.easy.frame.message.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.easy.frame.base.api.pojo.BasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * @author tp
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "NewsMsgTemplate对象", description = "消息模板表")
public class NewsMsgTemplate extends BasePO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "消息模板名称")
    private String name;

    @ApiModelProperty(value = "消息模板使用渠道msg、email")
    private String channelCode;

    @ApiModelProperty(value = "消息模板使用渠道名称")
    private String channelName;

    @ApiModelProperty(value = "消息模板内容")
    private String content;

    @ApiModelProperty(value = "消息类型id")
    private Long msgCategoryId;

    @ApiModelProperty(value = "供应商id")
    private int supplierId;

    @ApiModelProperty(value = "消息渠道类型id")
    private Long channelCategoryId;

    @ApiModelProperty(value = "模板类型为app时的一些配置事项，string类型的json格式，支持的配置参照：AppConfigDto.class")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private AppConfigDto appConfig;

    @ApiModelProperty(value = "是否临时模板0临时/1不是临时，（通过管理后台创建的不是临时模板、通过接口调用模板发送信息改变里面的内容为临时模板）")
    private Integer isTemporary;

    @ApiModelProperty(value = "消息模板内容备注")
    private String contentRemarks;

    @ApiModelProperty(value = "webSocketUrl")
    private String webSocketUrl;

}
